<?php
/**
 * Created by PhpStorm.
 * User: osyun
 * Date: 2017/8/15
 * Time: 9:58
 */

namespace app\cms\model;

use think\Model;
use think\Db;

class AppCategory extends Model
{
    /*
     * 获取app
     */
    public function getList(){
        $res = Db::name('app_category')->select();
        return $res;
    }

    /*
     * 获取app名称
     */
    public function getAppidName(){
        $res = Db::name('app_category')->select();
        $list_app = array();
        $i=0;
        foreach ($res as $key=>$app){
            $list_app[$i++] = $app['name'];
        }
        return $list_app;
    }

}